import {instance} from '../utils/request';

export const addOrEdit = (data)=>{
  return instance.post("cart/addOrEdit", data)
}

export const findPageCarts = (data)=>{
  return instance.post("cart/find/page",data)
}

export const deleteCarts = (data)=>{
  return instance.delete(`cart/delete/${data}`)
}

export const findCart = (id) =>{
  return instance.get(`cart/find/${id}`)
}

export const addCacheCart = (data)=>{
  return instance.post('cart/add/cache',data)
}

export const findCacheCarts = ()=>{
  return instance.get('cart/find/cache/cart')
}

export const updateCartCheck = (params)=>{
  return instance.post("cart/update/checked",params)
}